from ReturnT import ReturnT


# cs 架构， client： 负责执行器监测， 任务运行监测，任务激活，去激活，日志
#

class ExecutorBiz:

    # 执行器监测： 向adminBiz ping
    def beat(self):
        return ReturnT.success

    # 运行任务监测： IdleBeatParam
    def idleBeat(self, idleBeatParam) -> ReturnT:
        idleBeatParam.getJobId().isRuning()
        return ReturnT

    # 任务激活： triggerParam
    def run(self, triggerParam) -> ReturnT:
        triggerParam.getJobId().start()
        return ReturnT

    # 任务终止
    def kill(self, killParam) -> ReturnT:
        killParam.getJobId().stop()
        return ReturnT

    # 任务运行日志
    def log(self, logParam):
        logParam.getJobId()
        return ReturnT




